home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / misc / emu / ATUtilities.lha / ATUtilities / BASIC / SETSERV.BAS < prev    next >
BASIC Source File  |  2000-09-26  |  4KB  |  125 lines

  1. rem ==============================================================
  2. rem == Interrupt $0B:                                           ==
  3. rem ==   AH=Funktionsnummer                                     ==
  4. rem ==                                                          ==
  5. rem == AH=1:  GetParamOffset                                    ==
  6. rem ==          => AL = JIntNummer                              ==
  7. rem ==          <= DI = Offset                                  ==
  8. rem ==                                                          ==
  9. rem == AH=2:  AllocJanusMem                                     ==
  10. rem ==          => AL = Speichertyp                             ==
  11. rem ==          => BX = Anzahl der Bytes                        ==
  12. rem ==          <= BX = Offset auf Speicher                     ==
  13. rem ==                                                          ==
  14. rem == AH=3:  FreeJanusMem                                      ==
  15. rem ==          => AL = Speichertyp                             ==
  16. rem ==          => BX = Offset auf Speicher                     ==
  17. rem ==                                                          ==
  18. rem == AH=4:  SetParamOffset                                    ==
  19. rem ==            => AL = JIntNummer                              ==
  20. rem ==          => BX = Offset                                  ==
  21. rem ==                                                          ==
  22. rem == AH=5:  Nicht benutzt                                     ==
  23. rem == AH=6:  Nicht benutzt                                     ==
  24. rem ==                                                          ==
  25. rem == AH=11: GetService                                        ==
  26. rem ==          => AL = Flags                                   ==
  27. rem ==          => CX = LocalID                                 ==
  28. rem ==          => DI = Offset von PCCustomer                   ==
  29. rem ==          => SI = AppID (2. Wort)                         ==
  30. rem ==          => DS = AppID (1. Wort)                         ==
  31. rem ==          => ES = Segment von FirstPCCustomer             ==
  32. rem ==          <= AL = Fehler (0 = Kein Fehler)                ==
  33. rem ==          <= DI = Offset auf ServiceData-Struktur         ==
  34. rem ==                                                          ==
  35. rem == AH=12: CallService                                       ==
  36. rem ==          => DI = Service                                 ==
  37. rem ==                                                          ==
  38. rem == AH=13: ReleaseService                                    ==
  39. rem ==          => DI = Service                                 ==
  40. rem ==                                                          ==
  41. rem == AH=15: LockService                                       ==
  42. rem ==          => DI = Service                                 ==
  43. rem ==                                                          ==
  44. rem == AH=16: UnLockService                                     ==
  45. rem ==          => DI = Service                                 ==
  46. rem ==                                                          ==
  47. rem ==============================================================
  48.  
  49. $INCLUDE "REGNAMES.INC"
  50. def seg = &hd000
  51. cls
  52.  
  53. rAH=11  : rem GetS
  54. rAL=&H10+&H40+&H80
  55. rCX=20
  56. rDI=1000
  57. rSI=20
  58. rDS=0
  59. rES=&HD000
  60.  
  61.  
  62. poke 1000,&HB8
  63. poke 1001,&H00
  64. poke 1002,&H00
  65. poke 1003,&HCD
  66. poke 1004,&H10
  67. poke 1005,&HB2
  68. poke 1006,&H55
  69. poke 1007,&HB4
  70. poke 1008,&H06
  71. poke 1009,&HCD
  72. poke 1010,&H21
  73. poke 1011,&HCB
  74.  
  75. rem CB=RETF
  76. rem C3=RET
  77. rem CF=IRET
  78.  
  79. REG %AX,(rAH*256)+rAL
  80. REG %CX,rCX
  81. REG %DI,rDI
  82. REG %SI,rSI
  83. REG %DS,rDS
  84. REG %ES,rES
  85. call interrupt &HB
  86.  
  87. rAX=REG(%AX)
  88. x=varptr(rAX)
  89. l=peek(x+0)
  90. c=peek(x+1)
  91. serv=reg(%DI)
  92. if l=0 and c=0 and serv>0 then
  93.  ?"Service:       ";serv
  94.  ?"PCServer:       ";hex$(peeki(serv+30));" ";hex$(peeki(serv+32))
  95.  ?"AmigaUserCount:";peek(serv+9)
  96.  ?"PCUserCount:   ";peek(serv+10)
  97.  
  98.  chk&=0 : x&=-1
  99.  ?"<< šberwache >>"
  100.  while inkey$=""
  101.   chk&=0
  102.   for i=0 to 11
  103.    chk&=chk& + peek(1000+i)
  104.   next
  105.   if chk&<>x& then
  106.    x&=chk&
  107.    for i=0 to 11
  108.     ?hex$(peek(1000+i));"  ";
  109.    next
  110.    ?""
  111.   end if
  112.  wend
  113.  
  114.  REG %DI,serv
  115.  REG %AX,(13*256)
  116.  CALL INTERRUPT &H0B
  117.  
  118. else
  119.  ?"Service existiert nicht."
  120. end if
  121.  
  122. ende:
  123. ?"<< Taste >>"
  124. end
  125.